/*
 * GeneticAlgorithmApplication.cpp
 *
 *  Created on: Oct 21, 2013
 *      Author: filipe
 */
#include <iostream>
#include "RealGeneticAlgorithm.h"

using namespace std;
using namespace EvolutionaryOptimization;

double square(double *data)
{
	return (data[0] * data[0]);
}

int main(int argc, char **argv)
{
	double *best_individual;

	RealGeneticAlgorithm optimizer(new GeneticAlgorithmParameters(1, 100));

	optimizer._GenerateInitialPopulation();
	optimizer.Optimize(square);

	best_individual = optimizer.GetBestIndividual();
	cout << best_individual[0] << endl;

	return 0;
}



